import type { MenuProps } from 'antd';
import React from 'react';

type MenuItem = Required<MenuProps>['items'][number];

export interface Menus {
    title: string,
    key: string,
    icon?: string,
    children?: any
}

const menus: Array<Menus> = [
    {
        title: "主页",
        key: "/home/index",
        icon: 'HomeOutlined'
    },
    {
        title: "用户",
        key: "/user",
        icon: 'UserOutlined',
        children: <Array<Menus>>[
            {
                title: "用户管理",
                key: "/home/user/userManage"
            },
            {
                title: "用户分组",
                key: "/home/user/userGroup"
            },
            {
                title: "用户标签",
                key: "/home/user/userTag"
            },
            {
                title: "用户等级",
                key: "/home/user/userLevel"
            }
        ]
    },
    {
        title: "订单",
        key: "/order",
        icon: 'ShoppingCartOutlined',
        children: <Array<Menus>>[
            {
                title: "订单管理",
                key: "/home/order/orderManage"
            },
            {
                title: "收银订单",
                key: "/home/order/cashier"
            },
            {
                title: "售后订单",
                key: "/home/order/postSale"
            }
        ]
    },
    {
        title: "商品",
        key: "/store",
        icon: 'ShoppingOutlined',
        children: <Array<Menus>>[
            {
                title: "商品管理",
                key: "/home/store/index"
            },
            {
                title: "商品分类",
                key: "/home/store/sort"
            },
            {
                title: "商品规格",
                key: "/home/store/storeSpecs"
            },
            {
                title: "商品评论",
                key: "/home/store/storeReview"
            }
        ]
    },
    {
        title: "营销",
        key: "/marketing",
        icon: 'ShoppingOutlined',
        children: <Array<Menus>>[
            {
                title: "优惠券",
                key: "/marketing/coupon",
                children: <Array<Menus>>[
                    {
                        title: "优惠券列表",
                        key: "/home/marketing/coupon/list"
                    },
                    {
                        title: "用户领取记录",
                        key: "/home/marketing/coupon/record"
                    }
                ]
            }

        ]
    },

]

export default menus
